<html lang="zh-CN">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>{$tagInfo.title}</title>
<meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/common.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/iconfont/font_tuan.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<!-- <script src="http://sdk.talkingdata.com/app/h5/v1?appid=DE13C350F41F5DE78FEC51DB5DE730D1&vn=v2&vc=v2"></script> -->
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.1.1.3.min.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.alert.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/wx_share.js{$Think.config.RESOURCE_VER}"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/util.js{$Think.config.RESOURCE_VER}"></script>
	<if condition="$mallHue.mallHue eq '1'">
		<link href="{$Think.config.RESOURCEURL}wx_assets/css/product/product_yxds_index_blue.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="{$Think.config.RESOURCEURL}wx_assets/css/product_list_blue.css{$Think.config.RESOURCE_VER}">
		<else/>
		<link href="{$Think.config.RESOURCEURL}wx_assets/css/product/product_yxds_index.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="{$Think.config.RESOURCEURL}wx_assets/css/product_list.css{$Think.config.RESOURCE_VER}">
	</if>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/product/timer.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
</head>
<body>
<if condition="$selfInfo.subscribe eq '0'">
	<div class="careview">
		<img src="{$mallInfo.logo}" alt="" />
		<a href='{$mallInfo.wechaturl}'>立即关注</a>
		<empty name="mallInfo.recommend">
			<p>{$mallInfo.wechatname}</p>
			<else />
			<p>{$mallInfo.recommend}</p>
		</empty>
		<span></span>
	</div>
	<script>
		$('.careview > span').on('click',function(){
			$('.careview').hide();
		});
	</script>
</if>
<div class="lay_page page_cat_1">
	<div class="lay_page_wrap">
		<if condition="$tagInfo.picUrl neq ''">
			<div class="tagInfo">
				<img src="{$tagInfo.picUrl}"/>
				<div class="mallInfo" style="overflow: hidden;">
					<div style="display: inline-block;padding-right:10px;vertical-align: top;"><img src="{$mallInfo.logo}" height="55px" width="55px"></div>
					<div class="tagDes tagDesOpen">{$tagInfo.description}</div>
					<div class="open"><i class="iconfont">&#xe60a;</i></div>
				</div>
			</div>
		</if>
        <volist name="item" id="item" key="k">
            <div class="fn_goods qb_clearfix" id="pInfo">
                <ul id="show_container{$k}" >
                    <volist name="item.productList" id="product">
                    <li>
                    <a onclick="onDetail({$product.id})">
                        <div class="imgDiv">
							<img src="{$product['picUrl1'][1]['picUrl']}?x-oss-process=image/resize,w_200,h_200,m_mfit,x-oss-process=image/crop,w_200,h_200,g_nw" class="default">
							<if condition="$product['inventory'] eq '1' and $product['inventoryCount'] elt 0"><div class="soldOut">已抢完</div></if>
							<if condition="$product['playType'] eq 4 and $product['seckillIsEnd'] neq '1' and $product['seckillIsStart'] eq '1'">
								<div class="seckillTime">
									<p style="text-align: center;"><!--<i class="timeicon"></i>-->
										<if condition="$product['seckillIsEnd'] neq '1'">
											<if condition="$product['seckillIsStart'] eq '1'">
												<i class="lxftime" nowtime="{$product.nowTime}" endtime="{$product.seckillEndTime}" col="0" lxfday="no" lxftext="距结束"></i>
												<else />
												<!-- {$list.seckillStartTime}-->
												<!--<php>echo date("H:i:s",strtotime($list["seckillStartTime"]));</php>-->
												<i class="lxftime" nowtime="{$product.nowTime}" endtime="{$product.seckillStartTime}" col="0" lxfday="no" lxftext="距开始"></i>
											</if>
											<else />
											已抢完
										</if>
									</p>
								</div>
								<div class="seckill_right_top"></div>
								<else/>
								<div class="taggroup">
									<php>foreach($product["picTag"] as $key=>$value){</php>
																<span>
																	<p>{$value}</p>
																	<if condition="$mallHue.mallHue eq '1'">
																		<i><img class="tagImg" src="{$Think.config.RESOURCEURL}wx_assets/images/product/tag_blue.png{$Think.config.RESOURCE_VER}" alt="" /></i>
																		<else/>
																		<i><img class="tagImg" src="{$Think.config.RESOURCEURL}wx_assets/indiana/images/tag.png{$Think.config.RESOURCE_VER}" alt="" /></i>
																	</if>
																</span>
									<php>}</php>
								</div>
							</if>
						</div>
                            <div class="goods_name qb_fs_s mod_color_weak">
								<if condition="$product.freeBuy eq '1'">
									<span class="playTag">我要代言</span>
									<elseif condition="$product.playType eq '3'"/>
									<span class="playTag">夺宝</span>
									<elseif condition="$product.playType eq '6'"/>
									<span class=playTag>众筹</span>
								</if>
								{$product.name}
							</div>
							<if condition="$product.teambuy eq '1'">
								<div class="price qb_fs_s">
									<span class="mod_color_strong">&yen;{$product.teamPrice}</span>
									<del>&yen;{$product.fixedPrice}</del>
								</div>
								<elseif condition="$product.playType eq '3'"/>
								<div class="price">
									<div class="indianaInfo">
										<div class="bar">
											<span style="width:{$product.barProgress}"></span>
										</div>
										<if condition="$pitem.moduleType eq 'two'">
											<span style="font-size:12px;display:block;">开奖进度<span style="color:#009ddf">{$product.barProgress}</span></span>
											<else/>
											<div class="partakeCount">
												<span>总需{$product.totalCopies}人次</span>
												<span>剩余{$product.beenSold}</span>
											</div>
										</if>
									</div>
								</div>
								<elseif condition="$product.playType eq '6'"/>
								<div class="price">
									<div class="indianaInfo">
										<div class="bar">
											<span style="width:{$product.barProgress}"></span>
										</div>
										<div class="crowdInfo">
											<span style="margin:0">{$product.barProgress}</span>
											<span style="margin:0">{$product.supportPerson||default=0}人支持</span>
											<span style="margin:0">剩余<span>{$product.day}</span>天</span>
										</div>
									</div>
								</div>
								<elseif condition="$product.freeBuy eq '1'"/>
								<div class="price qb_fs_s">
									<span class="mod_color_strong">&yen;<php>
										$freeBuyMoney = explode(",",$product['freeBuyMoney']);
										if(count($freeBuyMoney) > 1) {
										echo $freeBuyMoney[0].'~'.end($freeBuyMoney);
										} else {
										echo $freeBuyMoney[0];
										}
									</php></span>
								</div>
								<elseif condition="$product.playType eq '5' AND $isEnjoyMiPrice eq '1'"/>
									<if condition="$product.supportSpecification eq '1'">
										<div class="price qb_fs_s">
											密友价:<span class="mod_color_strong">￥{$product.minMiPrice}</span>
										</div>
										<else/>
										<div class="price qb_fs_s">
											密友价:<span class="mod_color_strong">￥{$product.miPrice}</span>
										</div>
									</if>
								<elseif condition="$product.supportSpecification eq '1'"/>
									<if condition="$product.minDisPrice gt 0">
										<div class="price qb_fs_s">
											<span class="mod_color_strong">&yen;{$product.minDisPrice}~{$product.maxDisPrice}</span>
										</div>
										<else/>
										<div class="price qb_fs_s">
											<span class="mod_color_strong">&yen;{$product.minFixedPrice}</span>
										</div>
									</if>
								<else/>
									<if condition="$product.discountedPrice neq ''">
										<div class="price qb_fs_s">
											<span class="mod_color_strong">&yen;{$product.discountedPrice}</span>
											<del>&yen;{$product.fixedPrice}</del>
										</div>
										<else/>
										 <div class="price qb_fs_s"><span class="mod_color_strong">&yen;{$product.fixedPrice}</span></div>
									</if>
							</if>
                            </a>
                        </li>
                    </volist>
                </ul>
            </div>
        </volist>
	</div>
</div>
<a id="car" class="car" onclick="product.goCart()">
	<i class="iconfont">&#xe608;</i>
		<span>
			<p id="carNum"></p>
		</span>
</a>
<div class="qb_quick_tip qb_none" id="bubble"></div>
<script>
var baseUrl = '{$Think.config.SERVER_HOST}';
var customerId=$.util.getParam("customerId");
var hrefPath = baseUrl+'call.html?customerId='+customerId;
function onDetail(id) {
	var p=$.util.getParamAsObject();
	var mallQId = "{$quanInfo.qId}";
	var mallUId = "{$quanInfo.uId}";
	if((p&& p.qId)||(mallQId&&mallUId)){
		var params={
			"id":id,
			"miUId": p.miUId||mallUId,
			"qId": p.qId||mallQId,
			"fromGuid":p.fromGuid
		}
	}else{
		var params={
			"id":id
		}
	}
    params=encodeURIComponent(JSON.stringify(params));
    var pageUrl=baseUrl+'call.html?customerId={$customerId}&module=product&method=getProduct&params='+params;
    location.href= pageUrl;
}
var product={
	_init:function(){
		this.getCartGoodsNum();
		this._initTagDes();
		this._initEvent();
	},
	_initTagDes:function(){
		var tagDes =$(".tagDes");
		if(tagDes.height()>75){
			tagDes.removeClass("tagDesOpen");
		}else{
			tagDes.css({"width": "-webkit-calc(100% - 65px)","width":"calc(100% - 65px)"});
			$(".open").addClass("hide");
		}
	},
	_initEvent:function(){
		$(".open").click(function(){
			if($(this).hasClass("close")){
				$(this).removeClass("close");
				$(".tagDes").removeClass("tagDesOpen");
			}else{
				$(this).addClass("close");
				$(".tagDes").addClass("tagDesOpen");
			}
		});
	},
	getCartGoodsNum:function() {
		var customerId=$.util.getParam("customerId");
		$.req.get("call.json?module=product&customerId="+customerId+"&method=getCarNum",{
			userName:"{$userName}",
			params:{
				"type":"buy",
				"sid":"-1"
			}
		},function(data){
			if (!data.code) {
				$("#carNum").text(data.total || 0).data("num", data.total);
				if (data && data.total > 0) {
					$("#car").addClass("to-car");
				} else {
					$("#car").removeClass("to-car");
				}
			}
		});
	},
	goCart:function (){
		var p=$.util.getParamAsObject();
		var params=$.extend(p,{
			"sid":"-1",
			"type":"buy",
			"qId":p.qId||"{$quanInfo.qId}",
			"miUId":p.miUId||"{$quanInfo.miUId}"
		});
		params=encodeURIComponent(JSON.stringify(params));
		location.href = hrefPath+'&module=product&method=getCart&params=' + params;
	},
	getShareUrl:function(){
		var me = this;
		var p=$.util.getParamAsObject();
		var mallQId = "{$quanInfo.qId}";
		var mallUId = "{$quanInfo.uId}";
		if(p.qId||(mallQId&&mallUId)) {
			p.qId= p.qId||mallQId;
			p.miUId=p.miUId||mallUId;
		}
		p.fromUserName="{$userName}";
		var params=encodeURIComponent(JSON.stringify(p));
		shareUrl=baseUrl+'call.html?customerId={$customerId}&module=product&method=getProductByTagId&params='+params;
		return shareUrl;
	}
}
product._init();

lxfEndtime();
</script>
<script type="text/javascript">
	var shareUrl = product.getShareUrl();
	wx_share.init({
		"title":"{$tagInfo.title}",
		"desc":"{$tagInfo.description}",
		"imgUrl":"{$tagInfo.picUrl}",
		"link":shareUrl,
		"pkg":{
			"appId": '{$pkg.appId}',
			"timestamp": '{$pkg.timestamp}',
			"nonceStr": '{$pkg.nonceStr}',
			"signature": '{$pkg.signature}'
		},
		success:function(config,shareType){

		}
	});
</script>

</body>
</html>